package cn.tedu.spring.cnfig;

import cn.tedu.spring.file.Database;
import cn.tedu.spring.resource.WeiboMapper;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestSpringConfig {
    public static void main(String[] args) {
        ApplicationContext context=new
                AnnotationConfigApplicationContext(SpringConfig.class);
        Object bean = context.getBean(Database.class);
        System.out.println(bean);
        WeiboMapper bean1 = context.getBean(WeiboMapper.class);
        System.out.println(bean1);


    }
}
